#!/bin/bash

kernel_path="$(pwd)/stash/linux"
kernel_url="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"

mkdir -p $(pwd)/stash

# 初始化内核仓库
init_repository() {
    if [ ! -d "$1" ]; then
        echo "Cloning $2 repository to $1..."
        git clone "$2" "$1"
    else
        echo "Repository $1 already exists, skipping clone."
    fi
}

init_repository "$kernel_path" "$kernel_url"
